<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>用户信息</title>
    <%@include file="/WEB-INF/pages/common/taglib.jsp" %>
    <%@include file="/WEB-INF/pages/common/common.jsp" %>
    <style>
        #jqGridPager_left{
            line-height: 6px !important;
        }
        #jqGridPager_left input[type='button'] {
            background-color: white;
            border: 1px solid #e0e0e0;
            font-family: "Microsoft Yahei", "Hiragino Sans GB", sans-serif !important;
            height: 25px;
            width: 60px;
            font-size: 12px;
            margin-left: 5px;
            margin-top: -20px !important;
            color: #373737;
            cursor: pointer;
            border-radius: 5px;
        }
    </style>
</head>
<body>
<div>
    <div class="header_line">
        当前位置：备案管理<span>&gt;</span><strong>申报主体备案</strong>
    </div>
    <div class="mt10"></div>
    <form id="form_data1">
        <table class="table_search">
            <tr>
                <td class="width30p"><label>申报主体名称:</label></td>
                <td class="width70p" style="width: 220px"><input type="text" style="width: 220px"></td>
                <td class="width30p"><label>海关审核状态:</label></td>
                <td class="width70p">
                    <select>
                        <option>全部</option>
                        <option>备案暂存</option>
                        <option>待审批</option>
                        <option>审批通过</option>
                        <option>审批不通过</option>
                        <option>备案取消</option>
                    </select></td>
                <td class="width30p"><label>国检审核状态:</label></td>
                <td class="width70p">
                    <select>
                        <option>全部</option>
                        <option>备案暂存</option>
                        <option>待审批</option>
                        <option>审批通过</option>
                        <option>审批不通过</option>
                        <option>备案取消</option>
                    </select>
                </td>
            </tr>
        </table>
    </form>

    </br/>
    <div class="searchButton">
        <input type="button" value="查 询"/>
        <input type="button" value="重 置" onclick="javascript:document.forms[0].reset();"/>
    </div>
    </br/>
    <div class='responsive-table'>
        <table id="corptable">
        </table>
        <div id="jqGridPager">
        </div>
    </div>
</div>
<script>
    function declInfo() {
        layer.alert("请选择需要申报的记录！", {'icon': 7});
    }
    function deleteInfo() {
        layer.alert("请选择需要删除的记录！", {'icon': 7});
    }
    function modifyInfo() {
        layer.alert("请选择需要修改的记录！", {'icon': 7});
    }

    $(function () {
        $("#corptable").jqGrid({
            datatype: "json",
            url: "${basePath}/record/queryRecordList",
            postData: {
//                'CommandData': setTableByUrl("SearchTable")
            }, //发送数据
            colNames: ['申报主体类型', '申报主体名称', '申报主体名称', '申报主体备案编码', '申报日期', '海关审核状态', '国检审核状态'],
            colModel: [
                {name: 'name', index: 'name'},
                {name: 'logName', index: 'logName'},
                {name: 'email', index: 'email'},
                {name: 'email', index: 'email'},
                {name: 'name', index: 'name'},
                {name: 'logName', index: 'logName'},
                {name: 'email', index: 'email'}],
            autowidth: true,
            height: 'auto',
            shrinkToFit: false,
            forceFit: true,
            autoScroll: false,
            rowNum: 10, //每页显示记录数
            rowList: [10, 20, 100], //可调整每页显示的记录数
            rownumbers: true,
            rownumWidth: 35,
            multiselect: true, //是否支持多选
            viewrecords: true, //是否显示行数
            pager: "#jqGridPager", //分页工具栏
            altRows: true,
            altclass: 'someClass',
            sortable: false,
            loadComplete: function () {
                var rowNum = $(this).jqGrid('getGridParam', 'records');
                if (rowNum <= 0) {
                    if ($(this).parent().children('.norecords').length == 0)
                        $(this).parent().append("<div class=\"norecords\">暂无数据！</div>");
                    $(this).parent().children('.norecords').show();
                } else {//如果存在记录，则隐藏提示信息。
                    $(this).parent().children('.norecords').hide();
                }
                $("#corptable").setGridWidth($(window).width() * 0.98);
                $(".ui-jqgrid tr.ui-row-ltr td").css('text-align', 'center');
                $("#jqGridPager_left").html(
                        ' <input type="button" value="新 增" onclick="window.location.href=\'${basePath}/record/enterpriseDeclDetail\'" />' +
                        '<input type="button" value="修 改" onclick="modifyInfo()"/>' +
                        '<input type="button" value="删 除" onclick="deleteInfo()"/>' +
                        '<input type="button" value="申 报" onclick="declInfo()"/>');
            }
        });

    });

</script>
</body>
</html>
